﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wechat.Util.Image
{
    public class ImgUploadFileUtil
    {
        /// <summary>
        /// 根据图片上传的类型获取文件路径
        /// </summary>
        /// <param name="enumValue"></param>
        /// <returns>返回文件上传的路径</returns>
        public static string GetImgUploadPath(int enumValue)
        {
            string path = "/UploadFiles/images/";
            switch (enumValue)
            {
                case (int)StateCode.EnumImgPathType.Default:
                    //上传图片默认
                    path = "/UploadFiles/images/";
                    break;
                case (int)StateCode.EnumImgPathType.HeadImg:
                    //手机端图像路径
                    path = "/UploadFiles/images/headimg/";
                    break;
                case (int)StateCode.EnumImgPathType.ProductImg:
                    //产品图路径
                    path = "/UploadFiles/images/productimg/";
                    break;
                case (int)StateCode.EnumImgPathType.SKUImg:
                    //sku图路径
                    path = "/UploadFiles/images/skuimg/";
                    break;
                case (int)StateCode.EnumImgPathType.Category:
                    //商品类型图路径
                    path = "/UploadFiles/images/category/";
                    break;
                case (int)StateCode.EnumImgPathType.Comment:
                    //评论图路径
                    path = "/UploadFiles/images/comment/";
                    break;
                case (int)StateCode.EnumImgPathType.Brand:
                    //品牌路径
                    path = "/UploadFiles/images/brand/";
                    break;
                case (int)StateCode.EnumImgPathType.Active:
                    //活动主题图路径
                    path = "/UploadFiles/images/active/";
                    break;
                case (int)StateCode.EnumImgPathType.Chat:
                    //在线咨询图路径
                    path = "/UploadFiles/images/chat/";
                    break;
                /**
                 扩展
                 */

                default:
                    break;
            }
            return path;
        }
    }
}
